Image processing
40 bites tagged Image processing: interview questions with model answers, and 60-second explainers.
Test yourself: Top 30 Image processing interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.Zero-padding vs reflect vs replicate padding and their visual artifacts
This tests boundary assumptions in convolution. Zero-padding adds black borders causing dark vignettes; reflect padding mirrors edges for continuity; replicate padding repeats edge values outward. A red flag is saying padding choice does not affect outputs.
How does the Sobel operator approximate image gradients for edge detection?
This tests discrete gradient approximation via separable convolution. A strong answer covers 3x3 Gx and Gy kernels as smoothed central differences, then combines magnitude as sqrt(Gx^2 + Gy^2) or L1 norm. A red flag is treating them as arbitrary blur filters.
What is an image histogram and how does histogram equalization improve contrast?
Define a histogram as pixel counts per intensity; explain equalization normalizes the CDF to spread intensities across the full range.
How would you implement a simple box blur on a grayscale image?
Iterate interior pixels, sum the N by N neighborhood, divide by kernel area, write to a new buffer.
How does a Bayer filter capture color and what is demosaicing?
This tests CFA sampling tradeoffs. The answer covers the RGGB mosaic, demosaicing as interpolation of missing channels, and moire or zippering artifacts. A red flag is believing pixels capture full RGB natively or that demosaicing is only averaging.
Describe a grayscale histogram and its use in exposure and equalization
Tests pixel distribution intuition. A strong answer covers intensity bin counts, left or right clustering for exposure errors, and CDF-based redistribution for equalization. Red flag: calling equalization min-max stretching without cumulative mapping.
Watershed Algorithm: Segmenting by Topography
The watershed algorithm treats an image as a landscape where pixel brightness is height. It finds the 'ridges' separating distinct 'valleys,' effectively segmenting touching objects. Its main footgun is extreme sensitivity to noise, causing over-segmentation.
Sliding Windows: Scanning Images for Objects
A sliding window scans an image with a fixed-size box to find objects. At each location, a classifier checks the window's contents. Combined with an image pyramid, it can detect objects at various scales, localizing exactly where they are.
Image Thresholding: Separating Foreground from Background
Image thresholding turns a grayscale image into black and white by setting a brightness cutoff. It's used to isolate features for analysis, like finding text on a page.
Seam Carving: Resizing Images Without Distortion
Seam carving resizes images by removing or adding pixel "seams" of low importance, not by squashing or cropping the whole frame. It's used in content-aware tools to change aspect ratios without distorting key subjects like faces or buildings.
Exposure Fusion: HDR Looks Without the HDR File
Exposure fusion blends the best-lit pixels from several bracketed shots into one image. This lets you capture high-contrast scenes, like a bright window in a dark room, without creating a full HDR file.
Tone Mapping: Fitting HDR Light onto LDR Screens
Tone mapping compresses a vast range of light (HDR) to fit on a standard screen (LDR). It's how HDR photos and games look good on your monitor instead of having blown-out whites or crushed blacks. The footgun is creating unnatural, "over-cooked" images.
Focus Stacking: Combining Focal Planes for Ultimate Sharpness
Focus stacking creates an image with impossible depth of field by combining the sharpest parts of multiple photos. It's essential for macro, landscape, and microscopy where one shot can't keep everything sharp.
Image Stitching: Creating Panoramas from Overlapping Photos
Image stitching digitally 'tapes' together overlapping photos to create a single, wider panorama or a super-high-resolution image. It's used in phone panorama modes and for creating gigapixel photos. The main footgun is insufficient overlap between shots.
Scene Graph Generation: From Pixels to Relationships
Scene Graph Generation (SGG) moves beyond just finding objects in an image; it maps out the relationships between them. This enables deeper scene understanding for tasks like advanced image search.
Scene Parsing: Labeling Every Pixel in an Image
Scene parsing is like digital coloring-by-numbers, assigning a category like 'road' or 'sky' to every pixel. It's used by autonomous vehicles to understand the road and AR apps to place objects.
Horn-Schunck: Assuming Smooth Motion to See Clearly
The Horn-Schunck method estimates video motion by assuming neighboring pixels move similarly. This global 'smoothness' constraint solves the aperture problem, where local views give ambiguous motion data.
Background Subtraction: Finding What's Moving in Video
Think of a security camera that has memorized the empty room. Background subtraction digitally 'subtracts' this static view from the live feed, leaving only moving objects. It’s used to spot intruders or count cars, but fails if the background itself changes.
Frame Differencing: The Simplest Way to See Motion
See motion by subtracting one video frame from the next; what's left over is what moved. This is used for simple motion detection but is easily fooled by lighting changes or camera shake, which it misinterprets as movement.
Homography: Mapping Flat Surfaces Between Images
A homography is a 3x3 matrix that maps points between two images of a flat surface. It's used for panorama stitching and perspective correction. The footgun: it only works for planes or pure camera rotation, failing on scenes with depth.
Local Binary Patterns (LBP) for Texture Classification
LBP is a 'visual descriptor' that summarizes an image's texture into a feature set for a machine to read. It's a powerful tool for texture classification, but its performance often improves significantly when combined with other descriptors like HOG.
Histogram of Oriented Gradients (HOG)
HOG describes an object's shape by summarizing the directions of local intensity changes (gradients). It's a classic computer vision method for tasks like pedestrian detection where form matters more than color.
Difference of Gaussians: Finding Edges by Subtracting Blurs
Difference of Gaussians (DoG) finds features by subtracting a heavily blurred image from a lightly blurred one, isolating details at a specific scale. It's used for fast blob and edge detection.
Scale-Space: Analyzing Images at Multiple Scales
Scale-space representation is like viewing an image from far away and up close simultaneously. It creates a stack of progressively blurred images to reveal structures at different sizes, which is key for robust feature detection.
Get Image processing bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.